package com.situ.boot.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "recharge", schema = "brcc", catalog = "")
public class RechargeEntity {
    private int id;
    private Integer uid;
    private Double money;
    private Timestamp createTime;
    private Short state;
    private Timestamp updateTime;
    private Integer flag;
    private Double sheng;
    private Integer display;
    private Integer num;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uid")
    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "money")
    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "state")
    public Short getState() {
        return state;
    }

    public void setState(Short state) {
        this.state = state;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "flag")
    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Basic
    @Column(name = "sheng")
    public Double getSheng() {
        return sheng;
    }

    public void setSheng(Double sheng) {
        this.sheng = sheng;
    }

    @Basic
    @Column(name = "display")
    public Integer getDisplay() {
        return display;
    }

    public void setDisplay(Integer display) {
        this.display = display;
    }

    @Basic
    @Column(name = "num")
    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RechargeEntity that = (RechargeEntity) o;
        return id == that.id &&
                Objects.equals(uid, that.uid) &&
                Objects.equals(money, that.money) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(state, that.state) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(flag, that.flag) &&
                Objects.equals(sheng, that.sheng) &&
                Objects.equals(display, that.display) &&
                Objects.equals(num, that.num);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, uid, money, createTime, state, updateTime, flag, sheng, display, num);
    }
}
